<template>
  <div>
    <el-table size='mini' :data="tableData" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}" style="width: 100%">
      <el-table-column prop="name" :label="$t('应用名称')">
        <template slot-scope="scope">
          <tooltip :html="scope.row.name" :content="scope.row.name" class="wid190" :refName="scope.row.name">
          </tooltip>
        </template>
      </el-table-column>
      <el-table-column prop="cmd_type" :label="$t('应用类型')" :formatter="cmd_type">
      </el-table-column>
      <el-table-column prop="desc" :label="$t('描述')">
        <template slot-scope="scope">
          <tooltip :html="scope.row.desc" :content="scope.row.desc" class="wid190" :refName="scope.row.desc">
          </tooltip>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getAppReArray } from '@/api/list/app'
export default {
  name: 'AppRe',
  data () {
    return {
      tableData: []
    }
  },
  mounted () {
    getAppReArray().then(response => {
      this.tableData = response.info
    })
  },
  methods: {
    cmd_type (row) {
      switch (row.app_type) {
        case 'white':
          return this.$t('白名单')
        case 'black':
          return this.$t('黑名单')
        case 'any':
          return this.$t('任意')
        default:
          return this.$t('其他')
      }
    }
  }
}
</script>

<style scoped>
</style>
